import service from '../../utils/service'
import {RegisterAsyncOptions, LoginAsyncOptions} from './constant'


// 注册账户
export const registerAsync = (data: RegisterAsyncOptions): Promise<any> => {
  return service.postAsync({url: '/user/register', data })
}

// 登陆
export const loginAsync = (data: LoginAsyncOptions): Promise<any> => {
  return service.postAsync({url: '/user/login', data})
}
